home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1994 November / Cd Ware (Nro. 2) - Epimundo.iso / DOS / ED / PCKEY.ZIP / PCKEY.DOC < prev    next >
Encoding:
Text File  |  1993-11-05  |  17.9 KB  |  376 lines

  1. PcKey v1.01 is Copyright 1991-1993 Andrew Sprott. All rights reserved.
  2.  
  3. Welcome to PcKey. Here is a short description of the files on this disk that are part of the PcKey package:
  4.  
  5. PCKEY.COM    The typing tutor program
  6.  
  7. PCKEY.DOC    This document
  8.  
  9. PCKEY.HIS    Release history for this and previous versions of PcKey
  10.  
  11. PCKEY.PJT    PcWord project file for the documentation
  12.  
  13. PCKEY.SCR    Root script file for the PcKey tutorial
  14. WELCOME.SCR    PcKey tutorial script files
  15. INTRO.SCR
  16. HOMEKEYS.SCR
  17. KEYSUP.SCR
  18. KEYSDOWN.SCR
  19. ALLKEYS.SCR
  20. SYMKEYS.SCR
  21. MORE.SCR
  22. PROGRESS.SCR
  23. REPEAT.SCR
  24. SAVE.SCR
  25. WAITSPC.SCR
  26. DOTEST1.SCR
  27. DOTEST2.SCR
  28. DOTEST3.SCR
  29. DOTEST4.SCR
  30. EX_MENU.SCR
  31. EXSIZE1.SCR
  32. EXSIZE2.SCR
  33. EXSIZE3.SCR
  34. EXSIZE4.SCR
  35. EXSIZE5.SCR
  36. SOFAR.SCR
  37. STSPEED.SCR
  38.  
  39. TUTOR.BAT    Batch file to run PcKey
  40.  
  41. * * *
  42.  
  43. Registration
  44.  
  45.     I am distributing PcKey separately from PcWord and I am selling it for 15 pounds. If you have evaluated PcKey in the 30 day trial period, and you wish to use it further then please register PcKey by sending me 15 Pounds Sterling to the following address
  46.  
  47.     Andrew Sprott
  48.     61 Bryn y mor
  49.     Three Crosses
  50.     Gower
  51.     Swansea SA4 3PE
  52.     UK
  53.  
  54. or, if you live in America, send 25 US Dollars to:
  55.  
  56.     Eoin Sprott
  57.     Apartment 526,
  58.     Rivercross,
  59.     531 Main Street,
  60.     Roosevelt Island,
  61.     New York NY 10044
  62.  
  63.     You are welcome to distribute copies of this package provided it is unaltered. But you are also welcome to distribute any additional script files you have created yourself.
  64.  
  65. * * *
  66.  
  67. PcKey
  68.  
  69. Using PcKey is relatively simple. First enter
  70.  
  71.     TUTOR
  72.  
  73. at the command line.
  74.  
  75.     When inside PcKey you basically have two options: The Tutorial or the Editor. To try the tutorial press 1. Everything is explained inside the tutorial and you should find no problems getting started.
  76.  
  77.     Once you have got used to the exercises. You might like to try the editor. You can go into the editor by pressing 2 at the main menu. To return to the main menu from anywhere inside PcKey press ESC. ESC is short for ESCape.
  78.  
  79.     The editor inside PcKey works very much the same as your average word processor but without the advanced features. You move the cursor - the flashing block - with the cursor keys. The cursor keys are the keys marked with arrows. They will be on the numeric keypad, and also with the newer keyboards, on a separate cluster of keys inbetween the numeric keypad and the main keyboard.
  80.  
  81.     Other keys to use are:
  82.  
  83.     HOME        Move cursor to start of row.
  84.     END            Move cursor to end of row.
  85.     Page_Up or PgUp    Move cursor one page back.
  86.     Page_Down or PgDn    Move cursor one page forward.
  87.     CTRL-Page_Up        Move cursor to start of text.
  88.     CTRL-Page_down    Move cursor to end of text.
  89.  
  90.     TAB            Move cursor to next tab stop.
  91.     ENTER        Terminate current paragraph.
  92.  
  93.     For a more thorough explanation of word processing, see the documentation for PcWord.
  94.  
  95.  
  96. The PcKey script commands reference
  97.  
  98.     PcKey is a typing tutor with a tutorial that consists of text - or 'script' - files that are read from disk and executed like a program. The instructions - or `commands' - in each script file perform certain simple tasks like printing words and messages on the screen or reading and setting `variables' that indicate how fast you are typing and what level of accuracy to set the pass rate and so on.
  99.  
  100.     Most commands also have "arguments" that are either text messages or numerical values or even single characters. For example, the CURSOR command needs to know what row and column to position the cursor, and the PRINT command needs to know what text to display on the screen.
  101.  
  102.     All screen coordinates used by the CURSOR, CLEAR, SCROLL and KEYBOARD commands start at 0 and end at 79 columns and 24 rows. Any arguments enclosed in brackets [] are optional, if they are omitted then the default for that argument is assumed. All commands, operators (see the IF command) and arguments should be separated by a space. Where SET is indicated as the argument, SET is 1 of 3. A set consists of data like the typists speed, accuracy and mistakes, as well as a user configuration variable which can be used for recording what the typist was last doing when he or she exited from the typing tutor.
  103.  
  104.     Each command should be at the start of a line, and can be upper or lower case. All of the files with the .SCR extension, ie. PCKEY.SCR are script files. They can be TYPEd at the DOS prompt or loaded into any text editor, including the built in editor. By looking at these files you will see how the script language works.
  105.  
  106.  
  107. CLEAR [ start_line [ end_line ] ]
  108.  
  109.     Clear the screen, if end_line is omitted then line 24 is assumed, if start_line is omitted then line 0 is assumed. The cursor position will be set at the start of the first line cleared.
  110.  
  111.  
  112. CURSOR column row
  113.  
  114.     Position the cursor for any subsequent printing or typing.
  115.  
  116.  
  117. PRINT ['] text
  118.  
  119.     Output text to screen, the text can only fit on one line. A leading single quote will be ignored, this allows for any leading whitespace to be included as part of the text.
  120.  
  121.  
  122. ENTER
  123.  
  124.     Output carriage return marker to screen
  125.  
  126.  
  127. SCROLL [ lines [ start_line [ end_line ] ]
  128.  
  129.     This will scroll the screen, if end_line is omitted then line 24 is assumed, if start_line is omitted then line 0 is assumed and if lines is omitted then screen will scroll one line.
  130.  
  131.  
  132. AUTO
  133.  
  134.     Toggle auto increment/decrement of typing rate. If AUTO is on then the accuracy of the typist is checked every 20 seconds, if it is equal or higher than PASS then the typing rate will increase by 1 word per minute. If it is below FAIL then the typing rate will slow down. You can check if AUTO is on by checking to see if it is zero or not. For example if you want to ensure it is off then use the following line
  135.  
  136. IF AUTO ! 0 AUTO
  137.  
  138.     If AUTO is 0 then auto increment/decrement is off, else it is on.
  139.  
  140.  
  141. FAIL low_threshold
  142.  
  143.     If accuracy falls below low_threshold and auto is on then typing rate goes down. The default is 35%.
  144.  
  145.  
  146. PASS high_threshold
  147.  
  148.     If accuracy is above high_threshold and auto is on then typing rate goes up. The default is 90%.
  149.  
  150.  
  151. START set
  152.  
  153.     Resets timers and counters in one of 3 sets.
  154.  
  155.  
  156. ACCURACY set
  157.  
  158.     Accuracy of set (1 of 3) will be displayed at cursor position
  159.  
  160.  
  161. SPEED rate
  162.  
  163.     Set speed in words per minute, if 0 then no timeout will occur. When this command is set at a non zero speed, the interval timeout has to be approximated. The actual speed in words per minute in real time may vary depending on how slow your machine is. This is because there is no way PcKey can determine how fast it may take to highlight - and unhighlight - keys on the displayed keyboard.
  164.  
  165.  
  166. WORDS set
  167.  
  168.     Displays speed of set in words per minute.
  169.  
  170.  
  171. MISTAKES set
  172.  
  173.     Displays number of mistakes in set.
  174.  
  175.  
  176. MEMORY set = constant
  177.  
  178.     User variables; these can be used to record the last lesson or whatever the user was doing the last time he or she finished.
  179.  
  180.  
  181. SAVE [filename]
  182.  
  183.     Save user variables to file on disk. If there is an error opening or writing the file then the tutorial will abort and an error message will be issued. If no filename is specified then either the filename passed to PcKey from the command line, or the default filename "PCKEY.SAV" will be assumed. If a filename is given without an extension, then the extension ".SAV" is assumed.
  184.  
  185.  
  186. LOAD [-] [filename]
  187.  
  188.     Read user variables from file on disk. If the "-" argument is present, and there is an error opening the file then the tutorial will abort and an error message will be issued; Otherwise, if the error "file not found" occurs and the "-" argument is not present then the filename specified - if there is one - will be set as the default filename, the user variables - MISTAKES, MEMORY etc. - will be set to 0 and the tutorial will continue execution with the next command. If a filename is given without an extension, then the extension ".SAV" is assumed.
  189.  
  190.  
  191. WAIT [-]
  192.  
  193.     Waits for keypress. The ASCII code for the key pressed is returned in KEY. If the "-" argument is included and ESC is pressed then the current script file will terminate and return to the previous level.
  194.  
  195.  
  196. SCAN
  197.  
  198.     Scan keyboard for state of ALT, CTRL, SHIFT, CAPS LOCK, SCROLL LOCK, NUM LOCK and the INSert keys. Use the SHIFT command to determine what keys are down.
  199.  
  200.  
  201. SHIFT [ template 0 - 15 ]
  202.  
  203.     Will return the state of the ALT, CTRL, SHIFT, SCROLL LOCK, NUM LOCK, CAPS LOCK, and INSert keys since the last call to SCAN or WAIT. The state of the bits in the value returned reflect which keys were down on the last call. If the optional template is included then it will be AND'ed with the bits returned.
  204.  
  205. Right SHIFT key = 1 (bit 0)
  206. Left SHIFT key = 2 (bit 1)
  207. CTRL key = 4 (bit 2)
  208. ALT key = 8 (bit 3)
  209. SCROLL LOCK key = 16 (bit 4)
  210. NUM LOCK key = 32 (bit 5)
  211. CAPS LOCK key = 64 (bit 6)
  212. INSert key = 128 (bit 7)
  213.  
  214.     If you think of each constant above as multiples of two, it becomes easier to understand. Like in decimal, you could assign each key a multiple of 10, so the right SHIFT key would equal 1, the left SHIFT key 10, the CTRL key 100 and so on. Therefore if you wanted to check for the left SHIFT key you would set the template to equal 10 and if you want to check for the CTRL key you would set template at 100. If you want to check if ONLY the left SHIFT key is down you would want to isolate both SHIFT keys from any other keys that may be down as well by setting the template at 11, and then check that the right SHIFT key is not down by checking if the result is 10. So, returning to multiples of 2 (binary), say that both SHIFT keys and the CAPS LOCK are down, then the SHIFT command will return the value 67 (1 for RIGHT shift + 2 for LEFT shift + 64 for CAPS LOCK.)
  215.  
  216. IF SHIFT 3 = 1 PRINT The only shift key down is the right shift key
  217.  
  218. SHIFT will return 67, the template 3 will isolate bits 0 and 1 ((bit 0 = 1) + (bit 1 = 2) = 3) and return 3, so the PRINT command will not be executed.
  219.  
  220.  
  221. TEST [-]
  222.  
  223.     If the cursor is positioned over a line of text then the typing tutor will commence at the cursor position and finish when the escape key is pressed or if it gets to the end of the line. If the "-" argument is included and ESC is pressed then the current script file will terminate and return to the previous level.
  224.  
  225.  
  226. KEYBOARD [ start_line ]
  227.  
  228.     Display keyboard starting at start_line or at line 0 if start_line is omitted.
  229.  
  230.  
  231. FKEY < ['] character > or < key ASCII constant >
  232.  
  233.     If the keyboard is displayed then the key of character will be drawn in the foreground colour. A leading single quote will be ignored. NOTE if the first non space character in the argument is a digit then a leading single quote will distinquish it from being an ASCII constant. The ASCII constant is included for the ENTER, BACKSPACE, TAB and left/right SHIFT keys. The codes for these keys are
  234.  
  235. Right SHIFT 1 Left SHIFT 2 BACKSPACE 8 TAB 9 ENTER 13
  236.  
  237.  
  238. BKEY < ['] character > or < key ASCII constant >
  239.  
  240.     If the keyboard is displayed then the key of character will be drawn in the background colour. A leading single quote will be ignored. NOTE if the first non space character in the argument is a digit then a leading single quote will distinquish it from being an ASCII constant. The ASCII constant is included for the ENTER, BACKSPACE, TAB and left/right SHIFT keys.
  241.  
  242.  
  243. HKEY < ['] character > or < key ASCII constant >
  244.  
  245.     If the keyboard is displayed then the key of character will be highlighted. A leading single quote will be ignored. NOTE if the first non space character in the argument is a digit then a leading single quote will distinquish it from being an ASCII constant. The ASCII constant is included for the ENTER, BACKSPACE, TAB and left/right SHIFT keys.
  246.  
  247.  
  248. HAREA ['] character
  249.  
  250.     If the keyboard is displayed then the finger area of the key of character will be highlighted. A leading single quote will be ignored.
  251.  
  252.  
  253. UAREA ['] character
  254.  
  255.     If the keyboard is displayed then the finger area of the key of character will be unhighlighted. A leading single quote will be ignored.
  256.  
  257.  
  258. KEY
  259.  
  260.     This command will return the ASCII character of the last key pressed. The code for the ESCape key is 27, TAB key 9, ENTER key 13.
  261.  
  262.  
  263. IF expr1 operator expr2 statement
  264.  
  265.     EXPR1 can be one of the following commands
  266.  
  267. AUTO
  268. FAIL
  269. PASS
  270. ACCURACY set
  271. SPEED
  272. WORDS set
  273. MISTAKES set
  274. MEMORY set
  275. KEY
  276. SHIFT [template]
  277.  
  278.     OPERATOR can be one of the following symbols
  279.  
  280.     =    Equal to
  281.     !    Not equal to
  282.     <    Smaller than
  283.     <=    Smaller or equal to
  284.     >    Greater than
  285.     >=    Greater or equal to
  286.  
  287.     EXPR2 can be any of the commands in EXPR1 or a constant value ie. 1 or 48.
  288.  
  289.     If EXPR1 evaluates to EXPR2 then STATEMENT will be executed else it will be ignored. STATEMENT can also be another IF command.
  290.  
  291.  
  292. GOTO label
  293.  
  294.     This command forces execution to start at the command following LABEL which is a "named" location in the script file. PcKey distinguishes a label from a command with a colon : prefixed at the start of the LABEL. For example in this script file
  295.  
  296. :wait_for_key
  297. wait
  298. if key = 27 goto exit
  299. goto wait_for_key
  300. :exit
  301.  
  302. ...
  303.  
  304. after a key has been pressed and it is ESCape - the code for ESC is 27 - then execution will transfer to the command following the LABEL :exit. Otherwise execution will transfer to the WAIT command following the LABEL :wait_for_key.
  305.  
  306.  
  307. SCRIPT [-] filename
  308.  
  309.     If filename exists then the script file will be loaded and executed. When it is finished then execution continues with the calling script file. Up to 32 script files can be nested. If the optional "-" is included as the first argument, and the last keypress was ESCape, then the calling script file will fall through as well. For example, this script
  310.  
  311. clear
  312. keyboard
  313. script - script2
  314.  
  315. ...
  316.  
  317. :exit
  318.  
  319.     is equivalent to
  320.  
  321. clear
  322. keyboard
  323. script script2
  324. if key = 27 goto exit
  325.  
  326. ...
  327.  
  328. :exit
  329.  
  330.     If no extension is included in the filename of the script file then the default extension ".SCR" will be assumed.
  331.  
  332.  
  333. THE BUILT IN EDITOR.
  334.  
  335.     The editor is designed to move you away from the tutorial to a typical word-processor/text-editor environment. The features are very basic, but serve as an introduction to text entry.
  336.  
  337.     If you are new to text processing then you will need to understand simple concepts, the most general being the 'cursor'. You will notice the cursor flashing on and off somewhere in the screen display. It generally covers one character.
  338.     Think of the cursor as the pen in your hand when you are writing. Whenever you enter any text from the keyboard, that text will be written to your document at the point where the cursor is. The same applies to your plain simple DOS prompt.
  339.  
  340.     There are other keypresses that will move the cursor to any other part of your document that you may be editing. The keys that I interpret for the functions are basically standard and are as follows:
  341.  
  342.     The four arrow keys - or cursor keys - are marked with arrows, up/down/left/right. They will always be situated on the numeric keypad over the 8/2/4/6 keys respectively. They will also appear on the newer keyboards as a small cluster of keys inbetween the main keyboard and numeric keypad.
  343.     These keys move the cursor in the direction of the arrow:
  344.  
  345.     UP_CURSOR_KEY: Move the cursor up one row. If the cursor is on the top displayed row of your text ie. at the top of the screen, then your text will 'scroll', that is, every row bar the bottom row, will move down a row and another row of text will be read from your document and displayed on the top row.
  346.  
  347.     DOWN_CURSOR_KEY: Move the cursor down one row. If the cursor is on the bottom displayed row of your text ie. at the bottom of the screen, then your text will 'scroll', that is, every row bar the bottom row, will move up a row and another row of text will be read from your document and displayed on the bottom row.
  348.  
  349.     LEFT_CURSOR_KEY: Move the cursor left one character. If the cursor is at the first character of a row - the left margin - then the cursor will move by the last character of the next row up.
  350.  
  351.     RIGHT_CURSOR_KEY: Move the cursor right one character. If the cursor is at the the right margin of your document then the cursor will move by the first character of the next row down.
  352.  
  353.     There are other keys used for editing and are also situated on the numeric keypad and as a seperate cluster of keys. Two are called 'HOME' and 'END' which are used to move the cursor to the START/END of the row that the cursor is on. That is, the HOME key will move the cursor to the first character of the cursor row - the left margin - and the END key will move the cursor to the right of the last character in the row.
  354.  
  355.     The PgUp and PgDn keys mean 'Page Up' and 'Page Down' respectively. Think of the text displayed - on the screen - as a 'window' to your document. Naturally, as you add more text to your document, it will outgrow the space allocated on the screen to display your work.
  356.     So even though your text starts to dissapear at the top of the screen as you are typing, it isn't actually lost; it is stored in memory. So it can be redisplayed by either pressing the up cursor key, making the window scroll, or by using PgUp or PgDn.
  357.  
  358.     Using PgUp or Page Up, will display the previous window-full of text to the screen. And the PgDn, or Page Down key will display the next window-full of text. You can press these keys until you get to the start/end of your document.
  359.  
  360.  
  361. COMMAND LINE INVOCATION.
  362.  
  363. PcKey will recognise 3 command line arguments
  364.  
  365. /s <script_filename>
  366.  
  367. If this is included in the command line then PcKey will not prompt for a script filename when the tutor option is selected from the main menu, but will use the filename passed from the command line. NOTE, the path to the script file will be also adopted for any other scripts loaded.
  368.  
  369. /e <editor_filename>
  370.  
  371. If this is included in the command line then PcKey will not prompt for an editor filename when the editor option is selected from the main menu, but will use the filename passed from the command line.
  372.  
  373. /m <save_filename>
  374.  
  375. If the commands LOAD and SAVE are used from within a script file and no filename is given, then the default filename "PCKEY.SAV" or the filename passed from the command line will be assumed.
  376.